package com.common.retrofit.methods;

import com.common.bean.FriendCicleBean;
import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.bean.HomeBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class FriendCircleMethods extends BaseMethods {

    private static FriendCircleMethods m_ins = null;

    public static FriendCircleMethods getInstance() {
        if (m_ins == null) {
            synchronized (FriendCircleMethods.class) {
                if (m_ins == null) {
                    m_ins = new FriendCircleMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Friend/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void friend_dynamic(Subscriber<FriendCicleBean> subscriber,
                      String uid  ,String hashid ,int page  ) {
        Observable observable = initService().friend_dynamic(System.currentTimeMillis()+"",
                "1522546fb8e6c8b6c2d37837e99d0730",uid ,hashid,page
        );
        toSubscribe(observable, subscriber);
    }
}
